home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_06
/
prince
/
expf.c
< prev
next >
Wrap
Text File
|
1994-01-24
|
382b
|
20 lines
/* expf function */
#include "xmath.h"
float (expf) (float x) {
/* compute expf(x) */
/* Test for special codes */
double xx;
int exp;
if (x != x) {
errno = EDOM;
return x;
}
/* should take care of big numbers here */
xx = x;
if (FLT_MAX_EXP < (exp = _Expf(&xx))
|| exp < FLT_MIN_EXP - FLT_MANT_DIG)
errno = ERANGE;
return xx;
}